//
//  YBTransferCoinsViewController+LayoutConstraints.m
//  Nectar
//
//  Created by famer on 2023/11/12.
//  Copyright © 2023 asance. All rights reserved.
//

#import "YBTransferCoinsViewController+LayoutConstraints.h"

@implementation YBTransferCoinsViewController (LayoutConstraints)

- (void)setLayoutConstraints{
    CGFloat width = self.view.size.width;
    CGFloat height = self.view.size.height;
    CGFloat leftMargin = 12;
    CGFloat topMargin = 20;
    
    CGSize toLabelSize = [self.selectAssetLabel textBoundingSizeWithMaxSize:CGSizeMake(width, 500)];
    self.selectAssetLabel.frame = CGRectMake(0, [UIView statusBarHeight]+20, width, toLabelSize.height);
    
    CGSize assetLabelSize = [self.assetLabel textBoundingSizeWithMaxSize:CGSizeMake(width, 500)];
    self.assetLabel.frame = CGRectMake(0, self.selectAssetLabel.bottom+4, width, assetLabelSize.height);
    
    self.backImageView.frame = CGRectMake(leftMargin, self.selectAssetLabel.top, 24, 24);
    self.backImageView.centerY = self.selectAssetLabel.bottom;
    
    self.backButton.frame = CGRectMake(0, self.selectAssetLabel.top, 40, 30);

    
    self.searchContentView.frame = CGRectMake(leftMargin, self.assetLabel.bottom+20, width-leftMargin*2, 44);
    
    self.searchImageView.frame = CGRectMake(leftMargin, 0, 24, 24);
    self.searchImageView.centerY = self.searchContentView.height*0.5;
    
    self.searchTextField.frame = CGRectMake(self.searchImageView.right+4,
                                            0,
                                            self.searchContentView.width-self.searchImageView.right-4-leftMargin,
                                            self.searchContentView.height);
    
    self.myTableView.frame = CGRectMake(leftMargin,
                                        self.searchContentView.bottom,
                                        width-leftMargin*2,
                                        height-self.searchContentView.bottom);
}
@end
